package com.jiang.jixiang.ui.adapter;

import android.view.View;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.jiang.jixiang.R;
import com.jiang.jixiang.bean.UsingHelpBean;
import com.ws.universal.tools.expandabletext.FoldTextView;

public class UsingHelpAdapter extends BaseQuickAdapter<UsingHelpBean.UsingHelp, BaseViewHolder> {
    public UsingHelpAdapter() {
        super(R.layout.item_usinghelp);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, UsingHelpBean.UsingHelp bean) {
        View inLine = holder.findView(R.id.inLine);
        FoldTextView foldTextView = holder.findView(R.id.foldTextView);
        foldTextView.setTitle(bean.getQuestion());
        foldTextView.setText(bean.getAnswer());
        if (getItemPosition(bean) == getData().size() - 1) {
            inLine.setVisibility(View.GONE);
        }
    }
}
